<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增CTCP应用')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">

<!--    <form class="form-horizontal m" id="form-app-detail" th:object="${ctcpApp}">-->
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">执行隐私计算命令：</label>
                <div class="col-sm-9">
                    <input id="command" type="text" name="" class="form-control" placeholder="请输入命令">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-12 col-sm-offset-3">
                    <button onclick="submitHandler()" type="submit" class="btn btn-primary">提交</button>
                    <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
                </div>
            </div>
        </div>
<!--    </form>-->
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
        var prefix = ctx + "system/app"
        $("#form-app-add").validate({
            focusCleanup: true
        });

        function submitHandler(e) {
            var command = document.getElementById("command").value;
            var data = { "command": command };
            $.operate.submit(prefix + "/submit", "post", "json", data, function(e){});
        }
</script>
</body>
</html>